<template>
  <div class="leftContainer">
    <div class="leftContainer-point">
      <div class="leftContainer-point-titleBgc">
        <div class="leftContainer-point-titleBgc-leftText">重点关注-主变</div>
      </div>
      <div class="leftContainer-point-content">
        <div class="leftContainer-point-content-load" v-for="(item, index) in loadData" :key="index">
          <div class="leftContainer-point-content-load-iconLoad" :style="{ backgroundImage: 'url(' + item.url + ')' }">
          </div>
          <div style="margin-left: 10px">
            <div style="display: flex;justify-content: space-between">
              <div class="leftContainer-point-content-load-loadData">
                {{ item.name }}
              </div>
              <div class="leftContainer-point-content-load-unit ">
                {{ item.unit }}
              </div>
            </div>
            <div class="leftContainer-point-content-load-loadText">
              {{ item.text }}
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="leftContainer-environment">
      <div class="leftContainer-environment-titleBgc">
        <div class="leftContainer-environment-titleBgc-leftText">环境信息</div>
      </div>
      <div class="leftContainer-environment-content">
        <div class="leftContainer-environment-content-load" v-for="(item, index) in envData" :key="index">
          <div class="leftContainer-point-content-load-iconLoad" :style="{ backgroundImage: 'url(' + item.url + ')' }">
          </div>
          <div style="margin-left: 10px">
            <div style="display: flex;">
              <div class="leftContainer-point-content-load-loadData">
                {{ item.name }}
              </div>
              <div class="leftContainer-point-content-load-unit ">
                {{ item.unit }}
              </div>
            </div>
            <div class="leftContainer-point-content-load-loadText">
              {{ item.text }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import wenImage from "../../assets/images/home/icon_wen.png";
import capacityImage from "../../assets/images/home/icon_capacity.png";
import rateImage from "../../assets/images/home/icon_rate.png";
import tempImage from "../../assets/images/home/icon_temp.png";
import wetImage from "../../assets/images/home/icon_wet.png";
import stressImage from "../../assets/images/home/icon_stress.png";
import loadImage from "../../assets/images/home/icon_load.png";

const loadData = ref([
  {
    url: loadImage,
    name: "2.409",
    unit: 'mw',
    text: "实时负荷",
  },
  {
    url: wenImage,
    name: "37.59",
    unit: '℃',
    text: "实时油温",
  },
  {
    url: capacityImage,
    name: "49.0",
    unit: 'mw',
    text: "额定容量",
  },
  {
    url: rateImage,
    name: "4.81",
    unit: '%',
    text: "负载率",
  },
]);
const envData = ref([
  {
    url: tempImage,
    name: "18.6",
    unit: "℃",
    text: "环境温度",
  },
  {
    url: wetImage,
    name: "53",
    unit: "RH",
    text: "环境湿度",
  },
  {
    url: stressImage,
    name: "96.4",
    unit: 'kPa',
    text: "大气压力",
  },
]);
</script>

<style lang="scss" scoped>
.leftContainer {
  display: flex;
  position: absolute;
  left: 17px;
  flex-direction: column;
  padding-top: 37px;
  z-index: 99;
  pointer-events: all;

  &-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 水平居中 */
    cursor: pointer;
    width: 411px;
    height: 235px;
    background-image: url("../../assets/images/home/bg_emphasis.png");
    background-size: 100% 100%;

    &-titleBgc {
      width: 393px;
      height: 37px;
      background-image: url("../../assets/images/home/bg_emphasisTit.png");
      background-size: 100% 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 14px;

      &-leftText {
        font-size: 20px;
        font-family: AlibabaPuHuiTi-2-65-Medium;
        font-weight: 400;
        background: linear-gradient(180deg, #DFF7FF 0%, #00C0FF 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-left: 53px;
        margin-bottom: 15px;
      }

      &-rightText {
        font-size: 14px;
        font-family: Alibaba PuHuiTi 2-55 Regular, Alibaba PuHuiTi 20;
        font-weight: normal;
        color: rgba(255, 255, 255, 0.7);

      }
    }

    &-content {
      width: calc(100% - 88px);
      height: calc(100% - 44px - 70px);
      margin-top: 35px;
      /* 垂直居中 */
      display: flex;
      justify-content: space-between;
      /* 水平两端对齐 */
      align-content: space-between;
      align-items: flex-start;
      /* 上端对齐 */
      flex-wrap: wrap;

      /* 允许换行 */
      &-load {
        width: 130px;
        height: 43px;
        display: flex;
        // justify-content: space-between;
        align-items: center;

        &-iconLoad {
          width: 38px;
          height: 38px;
          background-image: url("../../assets/images/home/icon_load.png");
          background-size: 100% 100%;
        }

        &-loadData {
          font-size: 18px;
          font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
          font-weight: normal;
          color: #FFFFFF;

        }

        &-unit {
          font-size: 14px;
          font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
          font-weight: normal;
          line-height: 23px;
          color: #FFFFFF;
        }

        &-loadText {
          font-size: 14px;
          font-family: Alibaba PuHuiTi 2-55 Regular, Alibaba PuHuiTi 20;
          font-weight: normal;
          color: rgba(255, 255, 255, 0.7);
        }
      }
    }
  }

  &-environment {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 水平居中 */
    cursor: pointer;
    width: 411px;
    height: 155px;
    background-image: url("../../assets/images/home/bg_emphasis.png");
    background-size: 100% 100%;
    margin-top: 32px;

    &-titleBgc {
      width: 393px;
      height: 37px;
      background-image: url("../../assets/images/home/bg_emphasisTit.png");
      background-size: 100% 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 14px;

      &-leftText {
        font-size: 20px;
        font-family: AlibabaPuHuiTi-2-65-Medium;
        font-weight: 400;
        line-height: 23px;
        background: linear-gradient(180deg, #DFF7FF 0%, #00C0FF 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-left: 53px;
        margin-bottom: 15px;
      }

      &-rightText {
        font-size: 14px;
        font-family: Alibaba PuHuiTi 2-55 Regular, Alibaba PuHuiTi 20;
        font-weight: normal;
        color: rgba(255, 255, 255, 0.7);
      }
    }

    &-content {
      width: calc(100% - 30px);
      height: calc(100% - 44px - 70px);
      margin-top: 35px;
      /* 垂直居中 */
      display: flex;
      justify-content: space-between;
      /* 水平两端对齐 */
      align-items: flex-start;

      /* 上端对齐 */
      &-load {
        width: 130px;
        height: 43px;
        display: flex;
        // justify-content: space-between;
        align-items: center;

        &-iconLoad {
          width: 38px !important;
          height: 38px !important;
          background-image: url("../../assets/images/home/icon_load.png");
          background-size: 100% 100%;
        }

        &-loadData {
          font-size: 18px;
          font-family: Alibaba PuHuiTi 2-75 SemiBold, Alibaba PuHuiTi 20;
          font-weight: normal;
          color: #ffffff;
        }

        &-loadText {
          font-size: 14px;
          font-family: Alibaba PuHuiTi 2-55 Regular, Alibaba PuHuiTi 20;
          font-weight: normal;
          color: rgba(255, 255, 255, 0.7);
        }
      }
    }
  }
}
</style>